import Vue from 'vue'
import App from './App.vue'
import router from './router/router'
import "@/router/permission"
import ElementUI from 'element-ui'
import VueI18n from 'vue-i18n'
import { messages } from './components/common/i18n'
import 'element-ui/lib/theme-chalk/index.css'
import '@/style/icon.css'
import '@/components/common/directives'
import "babel-polyfill"
import '@/utils/auth'
import VueWechatTitle from 'vue-wechat-title';
import VueClipboard from 'vue-clipboard2'

Vue.config.productionTip = false;
Vue.use(VueI18n);
Vue.use(ElementUI, {size: 'mini'});
Vue.use(router)
Vue.use(VueWechatTitle)
Vue.use(VueClipboard)

const i18n = new VueI18n({
    locale: 'zh-CN',
    messages
});


let vueThis = new Vue({
    router,
    i18n,
    render: h => h(App)
}).$mount('#app');

export default vueThis;


/**************** 挂载通用方法 ****************/
import utils_ from './utils/utils'
Vue.prototype.utils = utils_;

import auth_ from './utils/auth'
Vue.prototype.auth = auth_;

import consts_ from './utils/consts'
Vue.prototype.consts = consts_;

import format_ from './utils/format'
Vue.prototype.format = format_;

import request_ from './utils/request'
Vue.prototype.request = request_;

